NOTE: This Technical Q&A has been retired. Please see the Technical Q&As page for current documentation.

Technical Q&A TB04
Control Panel Problems with Popup Menu's Click Area

Q In developing the Control Panel for our driver, I'm having a problem getting a popup menu's click area to register correctly. Currently, you can click on the popup's title to activate the control, but clicking on the popup box does not seem to register. Using Resedit, I have tried to compare the DITL's bounds information with that found in the 'ctrl' resource, but I haven't been able to make any connections between the two sets of coordinates. We are using a ProcID of 1008.

A The problem you describe is most often the result of having improper values in the 'ctrl' resource. Here are some guidelines for the values for the various fields:

BoundsRect: The bounds rect should be big enough to frame both the popup menu title and the popup menu indicator.

Value: Holds the constant which allows you to specify the style and justification of the popup.

Max: The width of the popup menu title.

Min: The resource ID of the 'MENU' resource.

ProcID: 1008 + a variation code, if desired.

RefCon: For your application to use.

Title: Whatever you'd like.

It is important to have values for Bounds and Max that make sense. The following figure shows the relationship between the numbers:

    Popup: [Popup Item ]

|    >                           bounds.left
|                           >    bounds.right
      |     >                    title width (Max)

[May 01 1995]


Developer Documentation | Technical Notes | Development Kits | Sample Code